<template>
  <el-card class='container'>
    <el-row :gutter='32' v-if='chartTrendData.allAmount'>
      <el-col :span='6'>
        <!--    数据模块-->
        <trend-data-vue :data='chartTrendData'></trend-data-vue>
      </el-col>

      <el-col :span='18'>
        <!--    图表模块-->
        <trend-chart-vue :data='chartTrendData'></trend-chart-vue>
      </el-col>
    </el-row>

  </el-card>
</template>

<script setup>
import { ref } from 'vue'
import trendDataVue from './trend-data.vue'
import trendChartVue from './trend-chart.vue'
import { getChartTrend } from '@/api/chart'

const chartTrendData = ref({})
const getChartTrendData = async () => {
  const res = await getChartTrend()
  chartTrendData.value = res
}
getChartTrendData()

</script>

<style lang='scss' scoped>
.container {
  height: 286px;
}
</style>
